<{include file="../public/header.html"}>
<div class="container-fluid">

    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <ul class="nav nav-tabs page-tabs">
                    <li class="active"> <a href="#!">基本</a> </li>

                </ul>
                <div class="tab-content">
                    <div class="tab-pane active">

                        <form id="form1" action="" method="post" name="edit-form" class="edit-form">
                            <div class="form-group">
                                <label for="web_site_title">网站标题</label>
                                <input class="form-control" type="text" id="web_site_title" name="web_site_title" value="<{$configs['web_site_title']['value']}>" placeholder="请输入站点标题" >

                            </div>

                            <div class="form-group">
                                <label for="web_site_keywords">站点关键词</label>
                                <input class="form-control" type="text" id="web_site_keywords" name="web_site_keywords" value="<{$configs['web_site_keywords']['value']}>" placeholder="请输入站点关键词" >
                                <small class="help-block">网站搜索引擎关键字</small>
                            </div>
                            <div class="form-group">
                                <label for="web_site_description">站点描述</label>
                                <textarea class="form-control" id="web_site_description" rows="5" name="web_site_description" placeholder="请输入站点描述" ><{$configs['web_site_description']['value']}></textarea>
                                <small class="help-block">网站描述，有利于搜索引擎抓取相关信息</small>
                            </div>
                            <div class="form-group">
                                <label for="web_site_copyright">版权信息</label>
                                <input class="form-control" type="text" id="web_site_copyright" name="web_site_copyright" value="<{$configs['web_site_copyright']['value']}>" placeholder="请输入版权信息" >

                            </div>
                            <div class="form-group">
                                <label for="web_site_icp">备案信息</label>
                                <input class="form-control" type="text" id="web_site_icp" name="web_site_icp" value="<{$configs['web_site_icp']['value']}>" placeholder="请输入备案信息" >
                                <!--<small class="help-block">调用方式：<code>config('web_site_icp')</code></small>-->
                            </div>

                            <div class="form-group">
                                <label class="col-xs-12">站点开关</label>
                                <div class="col-xs-12">
                                    <label class="radio-inline" for="web_site_visit1">
                                        <input type="radio" id="web_site_visit1" name="web_site_visit" value="1" <{if $configs['web_site_visit']['value'] == 1}>checked="checked"<{/if}>>
                                        开启
                                    </label>
                                    <label class="radio-inline" for="web_site_visit0">
                                        <input type="radio" id="web_site_visit0" name="web_site_visit" value="0" <{if $configs['web_site_visit']['value'] == 0}>checked="checked"<{/if}>>
                                        关闭
                                    </label>
                                    <small class="help-block">站点关闭后将不能访问，后台可正常登录</small>
                                </div>
                            </div>
                            <div class="form-group">
                                <button type="submit" class="btn btn-primary m-r-5" onclick="return submitForm()">确 定</button>
                                <button type="button" class="btn btn-default" onclick="javascript:history.back(-1);return false;">返 回</button>
                            </div>
                        </form>

                    </div>
                </div>

            </div>
        </div>
    </div>
</div>
<!--消息提示-->
<script src="/backend/js/bootstrap-notify.min.js"></script>
<script type="text/javascript" src="/backend/js/lightyear.js"></script>
<script type="text/javascript" src="/static/js/jquery.form.js"></script>
<script>
    function submitForm()
    {
        $("#form1").ajaxSubmit({
            type: 'post',
            url: "/backend/config/website" ,
            success: function(data){
                var j = JSON.parse(data);
                if(j.code==1){
                    $( "#form1").resetForm();
                    lightyear.notify('操作成功，页面即将自动跳转~', 'success', 2000, 'mdi mdi-emoticon-happy', 'top', 'center');
                    setTimeout(function(){
                        location.href='/backend/config/website';
                    }, 2000)
                }else{
                    lightyear.notify(j.msg, 'danger', 500);
                }
            },
            error: function(XmlHttpRequest, textStatus, errorThrown){
                alert( "error");
            }
        });
        return false;
    }

</script>
<{include file="../public/footer.html"}>